package siga.visao;

import siga.visao_busca.buscaCurso;
import siga.visao_busca.buscaTurma;
import siga.visao_busca.buscaVer;
import siga.visao_busca.buscaDisciplina;
import siga.visao_busca.buscaCpaAvaliacao;
import java.awt.Color;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import javax.swing.Icon;
import javax.swing.JOptionPane;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;
import siga.banco.conexao;
import siga.navegadores.navegador;

public class relGerenciador_academico extends javax.swing.JInternalFrame {

    Icon leafIcon = new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/relatorio_16x16.png"));
    Icon openIcon = new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/printer_16.png"));
    Icon closedIcon = new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/printer_16.png"));

    List LRdescricao = new ArrayList();
    List LRarquivo = new ArrayList();
    List LRurl = new ArrayList();
    List LRtipo = new ArrayList();
    List LRcaixa = new ArrayList();
    public static List LRcontas = new ArrayList();
    public static List LRcentro = new ArrayList();
    /** Creates new form relGerenciador */
    public relGerenciador_academico() {
        initComponents();
        jtfAno.setText(new SimpleDateFormat("yyyy").format(new Date()));
        index.LRpessoa.clear();
        index.LRcurso.clear();
        index.LRturma.clear();
        index.LRfase.clear();
        index.LRdisciplina.clear();
        LRcontas.clear();
        LRcentro.clear();
    }

    @SuppressWarnings("static-access")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTree1 = new javax.swing.JTree();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jtfAno = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtfCurso = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jtfTurma = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jtfFase = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jtfPessoa = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jtfDisciplina = new javax.swing.JTextField();
        jButton21 = new javax.swing.JButton();
        jButton22 = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jtfRespFinanceiro = new javax.swing.JTextField();
        jButton23 = new javax.swing.JButton();
        jButton24 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jtfDtIni = new javax.swing.JFormattedTextField();
        jtfDtFin = new javax.swing.JFormattedTextField();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jButton13 = new javax.swing.JButton();
        jButton14 = new javax.swing.JButton();
        jButton15 = new javax.swing.JButton();
        jButton16 = new javax.swing.JButton();
        jButton17 = new javax.swing.JButton();
        jButton18 = new javax.swing.JButton();
        jButton19 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jpCpa = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jtfCod_avaliacao = new javax.swing.JTextField();
        jtfDesc_avaliacao = new javax.swing.JTextField();
        jButton25 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle("Gerenciador de Relatórios");
        setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/relatorio_16x16.png"))); // NOI18N
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameOpened(evt);
            }
        });

        jSplitPane1.setDividerLocation(300);
        jSplitPane1.setName("jSplitPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTree1.setFont(new java.awt.Font("SansSerif", 0, 11));
        javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("Relatórios");
        javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Diários");
        javax.swing.tree.DefaultMutableTreeNode treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Diário de Notas");
        treeNode2.add(treeNode3);
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Históricos");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Listas");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Outros");
        treeNode1.add(treeNode2);
        jTree1.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
        jTree1.setName("jTree1"); // NOI18N
        jTree1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTree1MouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTree1);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 641, Short.MAX_VALUE)
        );

        jSplitPane1.setLeftComponent(jPanel1);

        jPanel2.setName("jPanel2"); // NOI18N

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dados Gerais", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("SansSerif", 0, 11))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jLabel1.setText("Ano:");
        jLabel1.setName("jLabel1"); // NOI18N

        jtfAno.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfAno.setName("jtfAno"); // NOI18N

        jLabel2.setText("Curso:");
        jLabel2.setName("jLabel2"); // NOI18N

        jtfCurso.setEditable(false);
        jtfCurso.setName("jtfCurso"); // NOI18N

        jLabel3.setText("Turma:");
        jLabel3.setName("jLabel3"); // NOI18N

        jtfTurma.setEditable(false);
        jtfTurma.setName("jtfTurma"); // NOI18N

        jLabel4.setText("Bimestre / Fase / Módulo:");
        jLabel4.setName("jLabel4"); // NOI18N

        jtfFase.setEditable(false);
        jtfFase.setName("jtfFase"); // NOI18N

        jLabel6.setText("Pessoa:");
        jLabel6.setName("jLabel6"); // NOI18N

        jtfPessoa.setEditable(false);
        jtfPessoa.setName("jtfPessoa"); // NOI18N

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton4.setName("jButton4"); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jLabel5.setText("Disciplina:");
        jLabel5.setName("jLabel5"); // NOI18N

        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton5.setName("jButton5"); // NOI18N
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton6.setName("jButton6"); // NOI18N
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton7.setName("jButton7"); // NOI18N
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        jtfDisciplina.setEditable(false);
        jtfDisciplina.setName("jtfDisciplina"); // NOI18N

        jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton21.setName("jButton21"); // NOI18N
        jButton21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton21ActionPerformed(evt);
            }
        });

        jButton22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton22.setName("jButton22"); // NOI18N
        jButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton22ActionPerformed(evt);
            }
        });

        jLabel7.setText("Resp. Financeiro:");
        jLabel7.setName("jLabel7"); // NOI18N

        jtfRespFinanceiro.setEditable(false);
        jtfRespFinanceiro.setName("jtfRespFinanceiro"); // NOI18N

        jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton23.setName("jButton23"); // NOI18N
        jButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton23ActionPerformed(evt);
            }
        });

        jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton24.setName("jButton24"); // NOI18N
        jButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton24ActionPerformed(evt);
            }
        });

        jLabel9.setText("Semestre:");
        jLabel9.setName("jLabel9"); // NOI18N

        jTextField1.setEditable(false);
        jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextField1.setText("2");
        jTextField1.setName("jTextField1"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtfAno, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel9)
                                .addGap(2, 2, 2)
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtfDisciplina, javax.swing.GroupLayout.DEFAULT_SIZE, 525, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtfTurma, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jButton21, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtfFase, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtfCurso, javax.swing.GroupLayout.DEFAULT_SIZE, 549, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtfRespFinanceiro, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton23, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton24, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(3, 3, 3)
                        .addComponent(jtfPessoa, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jtfAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton7)
                        .addComponent(jButton4))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtfCurso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel2)))
                .addGap(5, 5, 5)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton6)
                        .addComponent(jButton3))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtfTurma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel3)))
                .addGap(11, 11, 11)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(jtfFase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(jtfDisciplina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton22)
                        .addComponent(jButton21)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtfRespFinanceiro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel7))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton24)
                        .addComponent(jButton23)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtfPessoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel6))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton5)
                        .addComponent(jButton2)))
                .addContainerGap())
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Intervalo de Datas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("SansSerif", 0, 11))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        jLabel12.setText("Data Inicial:");
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setText("Data Final:");
        jLabel13.setName("jLabel13"); // NOI18N

        try {
            jtfDtIni.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jtfDtIni.setName("jtfDtIni"); // NOI18N

        try {
            jtfDtFin.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jtfDtFin.setName("jtfDtFin"); // NOI18N

        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton8.setText("Hoje");
        jButton8.setToolTipText("Data de Hoje");
        jButton8.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton8.setName("jButton8"); // NOI18N
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton9.setText("Jan");
        jButton9.setToolTipText("");
        jButton9.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton9.setName("jButton9"); // NOI18N
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton10.setText("Fev");
        jButton10.setToolTipText("");
        jButton10.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton10.setName("jButton10"); // NOI18N
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton11.setText("Mar");
        jButton11.setToolTipText("");
        jButton11.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton11.setName("jButton11"); // NOI18N
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton12.setText("Maio");
        jButton12.setToolTipText("");
        jButton12.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton12.setName("jButton12"); // NOI18N
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });

        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton13.setText("Abr");
        jButton13.setToolTipText("");
        jButton13.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton13.setName("jButton13"); // NOI18N
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton14.setText("Jun");
        jButton14.setToolTipText("");
        jButton14.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton14.setName("jButton14"); // NOI18N
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });

        jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton15.setText("Julh");
        jButton15.setToolTipText("");
        jButton15.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton15.setName("jButton15"); // NOI18N
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });

        jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton16.setText("Ago");
        jButton16.setToolTipText("");
        jButton16.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton16.setName("jButton16"); // NOI18N
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });

        jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton17.setText("Set");
        jButton17.setToolTipText("");
        jButton17.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton17.setName("jButton17"); // NOI18N
        jButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton17ActionPerformed(evt);
            }
        });

        jButton18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton18.setText("Nov");
        jButton18.setToolTipText("");
        jButton18.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton18.setName("jButton18"); // NOI18N
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });

        jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton19.setText("Out");
        jButton19.setToolTipText("");
        jButton19.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton19.setName("jButton19"); // NOI18N
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });

        jButton20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/JDateChooserColor16.gif"))); // NOI18N
        jButton20.setText("Dez");
        jButton20.setToolTipText("");
        jButton20.setMargin(new java.awt.Insets(1, 1, 1, 1));
        jButton20.setName("jButton20"); // NOI18N
        jButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton20ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtfDtFin))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtfDtIni, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton10)
                    .addComponent(jButton11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton14)
                    .addComponent(jButton15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton19))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton20)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(jtfDtIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtfDtFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13)))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton8)
                            .addComponent(jButton10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton9)
                            .addComponent(jButton11)))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jButton13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton12))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jButton14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton15))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jButton16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton17))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton19)
                            .addComponent(jButton20))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton18)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/printer_32.png"))); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jpCpa.setBorder(javax.swing.BorderFactory.createTitledBorder("CPA"));
        jpCpa.setName("jpCpa"); // NOI18N

        jLabel8.setText("Avaliação:");
        jLabel8.setName("jLabel8"); // NOI18N

        jtfCod_avaliacao.setEditable(false);
        jtfCod_avaliacao.setName("jtfCod_avaliacao"); // NOI18N

        jtfDesc_avaliacao.setEditable(false);
        jtfDesc_avaliacao.setName("jtfDesc_avaliacao"); // NOI18N

        jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/busca_16x16.png"))); // NOI18N
        jButton25.setName("jButton25"); // NOI18N
        jButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton25ActionPerformed(evt);
            }
        });

        jButton26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/siga/imagem/sair_16x16.png"))); // NOI18N
        jButton26.setName("jButton26"); // NOI18N
        jButton26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton26ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpCpaLayout = new javax.swing.GroupLayout(jpCpa);
        jpCpa.setLayout(jpCpaLayout);
        jpCpaLayout.setHorizontalGroup(
            jpCpaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpCpaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtfCod_avaliacao, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtfDesc_avaliacao, javax.swing.GroupLayout.DEFAULT_SIZE, 444, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton25, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton26, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jpCpaLayout.setVerticalGroup(
            jpCpaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpCpaLayout.createSequentialGroup()
                .addGroup(jpCpaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jpCpaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton26)
                        .addComponent(jButton25))
                    .addGroup(jpCpaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel8)
                        .addComponent(jtfCod_avaliacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtfDesc_avaliacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jpCpa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jpCpa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(44, 44, 44)
                .addComponent(jButton1)
                .addGap(55, 55, 55))
        );

        jSplitPane1.setRightComponent(jPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1016, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 641, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if(jTree1.getLastSelectedPathComponent() != null){
           for(int i=0;i<LRdescricao.size();i++){
               if(LRdescricao.get(i).equals(jTree1.getLastSelectedPathComponent().toString()) && LRtipo.get(i).equals("Normal")){
                   String impressao = "";
                   impressao = (!index.usuario[0].equals(""))?"&cod_user="+index.usuario[0]:"";
                   impressao += (!jtfAno.getText().equals(""))?"&ano="+jtfAno.getText():"";
                   impressao += (!index.LRcurso.isEmpty())?"&cod_curso="+index.LRcurso.get(0):"";
                   impressao += (!index.LRdisciplina.isEmpty())?"&cod_disciplina="+index.LRdisciplina.get(0):"";
                   impressao += (!jtfTurma.getText().equals(""))?"&cod_matricula="+jtfTurma.getText():"";
                   impressao += (!jtfFase.getText().equals(""))?"&cod_fase="+jtfFase.getText():"";
                   impressao += (!index.LRpessoa.isEmpty())?"&cod_pessoa="+index.LRpessoa.get(0):"";
                   impressao += (!index.LRpessoa.isEmpty())?"&desc_pessoa="+index.LRpessoa.get(1):"";
                   impressao += (!jtfDtIni.getText().equals("  /  /    "))?"&datai="+jtfDtIni.getText():"";
                   impressao += (!jtfDtFin.getText().equals("  /  /    "))?"&dataf="+jtfDtFin.getText():"";
                   navegador.URL(LRarquivo.get(i).toString()+"?cod_emp="+index.cod_emp+impressao);
               }else if(LRdescricao.get(i).equals(jTree1.getLastSelectedPathComponent().toString()) && LRtipo.get(i).equals("CPA")){
                    try {
                        Map parametro = new HashMap();
                        parametro.put("cod_emp", index.cod_emp);
                        parametro.put("cod_avaliacao", jtfCod_avaliacao.getText());
                        parametro.put("avaliacao", jtfDesc_avaliacao.getText());
                        //parametro.put("cod_professor", index.LRpessoa.get(0).toString());
                        parametro.put("SUBREPORT_DIR", index.jasper);
                        JasperPrint jp = JasperFillManager.fillReport(LRarquivo.get(i).toString(), parametro, conexao.banco);
                        JasperViewer.viewReport(jp, false);
                    } catch (JRException ex) {
                        JOptionPane.showMessageDialog(null, "Erro ao abrir relatorio.\n"+ex.getMessage(),"Erro do Sistema",JOptionPane.ERROR_MESSAGE);
                    }
               }else if(LRdescricao.get(i).equals(jTree1.getLastSelectedPathComponent().toString()) && LRtipo.get(i).equals("Diploma")){
                    try {
                        if(LRarquivo.get(i).toString().equals(index.jasper+"rel_diploma_tec.jasper")){
                            Map parametro = new HashMap();

                            conexao.Query("select gc.*, p.descricao as desc_coord from grade_curso gc " +
                                    "left join pessoas p on p.codigo=gc.cod_coord_ti and p.cod_emp=gc.cod_emp " +
                                    "where gc.cod_emp="+index.cod_emp+" and gc.codigo="+jtfTurma.getText().substring(0, 3));
                            conexao.rs.next();
                            parametro.put("curso", (conexao.rs.getString("descricao")==null)?"":conexao.rs.getString("descricao"));
                            parametro.put("diretora", "Adriana Costa Gomes");
                            parametro.put("titulo", (conexao.rs.getString("titulacao")==null)?"":conexao.rs.getString("titulacao"));
                            parametro.put("dt_ini_curso", (conexao.rs.getString("dt_ini")==null)?"":new SimpleDateFormat("dd/MM/yyyy").format(conexao.rs.getDate("dt_ini")));
                            parametro.put("dt_fim_curso", (conexao.rs.getString("dt_fim")==null)?"":new SimpleDateFormat("dd/MM/yyyy").format(conexao.rs.getDate("dt_fim")));
                            parametro.put("lei", (conexao.rs.getString("fund_lei")==null)?"":conexao.rs.getString("fund_lei"));
                            parametro.put("decreto", (conexao.rs.getString("fund_dec")==null)?"":conexao.rs.getString("fund_dec"));
                            parametro.put("reconhecimento", (conexao.rs.getString("desc_reconhecimento")==null)?"":conexao.rs.getString("desc_reconhecimento"));
                            parametro.put("autorizacao", (conexao.rs.getString("auto_parecer")==null)?"":conexao.rs.getString("auto_parecer"));
                            parametro.put("dec_auto", (conexao.rs.getString("auto_dec")==null)?"":conexao.rs.getString("auto_dec"));
                            parametro.put("dosc", (conexao.rs.getString("diario_oficial_nr")==null)?"":conexao.rs.getString("diario_oficial_nr"));
                            parametro.put("dt_dosc", (conexao.rs.getString("diario_oficial_dt")==null)?"":new SimpleDateFormat("dd/MM/yyyy").format(conexao.rs.getDate("diario_oficial_dt")));
                            parametro.put("coordenador", (conexao.rs.getString("desc_coord")==null)?"":conexao.rs.getString("desc_coord"));
                            parametro.put("cidade", (index.cod_emp.equals("2"))?"Sombrio":"Capivari de Baixo");
                            parametro.put("area_prof", (conexao.rs.getString("area_prof")==null)?"":conexao.rs.getString("area_prof"));

                            conexao.Query("select descricao,nacionalidade,loc_nasc,dt_nasc,rg from pessoas where cod_emp="+index.cod_emp+" and codigo="+index.LRpessoa.get(0).toString());
                            conexao.rs.next();
                            parametro.put("pessoa", (conexao.rs.getString("descricao")==null)?"":conexao.rs.getString("descricao"));
                            parametro.put("nacionalidade", (conexao.rs.getString("nacionalidade").equals("B"))?"Brasileira":"Estrangeira");
                            parametro.put("natural", (conexao.rs.getString("loc_nasc")==null)?"":conexao.rs.getString("loc_nasc"));
                            parametro.put("dt_nasc", (conexao.rs.getString("dt_nasc")==null)?"":new SimpleDateFormat("dd/MM/yyyy").format(conexao.rs.getDate("dt_nasc")));
                            parametro.put("rg", (conexao.rs.getString("rg")==null)?"":conexao.rs.getString("rg"));

                            JasperPrint jp = JasperFillManager.fillReport(LRarquivo.get(i).toString(), parametro);
                            dispose();
                            JasperViewer.viewReport(jp, false);

                        }else if(LRarquivo.get(i).toString().equals(index.jasper+"rel_diploma_verso.jasper")){
                            Map parametro = new HashMap();

                            conexao.Query("select gc.*, p.descricao as desc_coord from grade_curso gc " +
                                    "left join pessoas p on p.codigo=gc.cod_coord_adj and p.cod_emp=gc.cod_emp " +
                                    "where gc.cod_emp="+index.cod_emp+" and gc.codigo="+jtfTurma.getText().substring(0, 3)+" Limit 1");
                            conexao.rs.next();
                            parametro.put("perfil", (conexao.rs.getString("perfil")==null)?"":conexao.rs.getString("perfil"));
                            parametro.put("coordenador", (conexao.rs.getString("desc_coord")==null)?"":conexao.rs.getString("desc_coord"));
                            parametro.put("cidade", (index.cod_emp.equals("2"))?"Sombrio, ":"Capivari de Baixo, ");

                            conexao.Query("select obs from pessoas where cod_emp="+index.cod_emp+" and codigo="+index.LRpessoa.get(0).toString()+" Limit 1");
                            conexao.rs.next();
                            parametro.put("obs", (conexao.rs.getString("obs")==null)?"":conexao.rs.getString("obs"));

                            JasperPrint jp = JasperFillManager.fillReport(LRarquivo.get(i).toString(), parametro);
                            dispose();
                            JasperViewer.viewReport(jp, false);
                        }else if(LRarquivo.get(i).toString().equals(index.jasper+"rel_diploma_verso_hab.jasper")){
                             Map parametro = new HashMap();
                            conexao.Query("select gc.*, p.descricao as desc_coord from grade_curso gc " +
                                    "left join pessoas p on p.codigo=gc.cod_coord_adj and p.cod_emp=gc.cod_emp " +
                                    "where gc.cod_emp="+index.cod_emp+" and gc.codigo="+jtfTurma.getText().substring(0, 3));
                            conexao.rs.next();
                            parametro.put("perfil", (conexao.rs.getString("perfil")==null)?"":conexao.rs.getString("perfil"));
                            parametro.put("coordenador", (conexao.rs.getString("desc_coord")==null)?"":conexao.rs.getString("desc_coord"));
                            parametro.put("cidade", (index.cod_emp.equals("2"))?"Sombrio, ":"Capivari de Baixo, ");

                            conexao.Query("select * from pessoas where cod_emp="+index.cod_emp+" and codigo="+index.LRpessoa.get(0).toString());
                            conexao.rs.next();
                            parametro.put("obs", (conexao.rs.getString("obs")==null)?"":conexao.rs.getString("obs"));
                            parametro.put("certificador", (conexao.rs.getString("qp_emitido")==null)?"":conexao.rs.getString("qp_emitido"));
                            parametro.put("dt_conc", (conexao.rs.getString("qp_dt_conclusao")==null)?"":new SimpleDateFormat("dd/MM/yyyy").format(conexao.rs.getDate("qp_dt_conclusao")));
                            parametro.put("local", (conexao.rs.getString("qp_local")==null)?"":conexao.rs.getString("qp_local"));
                            parametro.put("qp_cgh_quali_teo", (conexao.rs.getString("qp_cgh_quali_teo")==null)?"":conexao.rs.getString("qp_cgh_quali_teo"));
                            parametro.put("qp_cgh_quali_est", (conexao.rs.getString("qp_cgh_quali_est")==null)?"":conexao.rs.getString("qp_cgh_quali_est"));
                            parametro.put("qp_cgh_quali", (conexao.rs.getString("qp_cgh_quali")==null)?"":conexao.rs.getString("qp_cgh_quali"));
                            parametro.put("qp_cgh_proj", (conexao.rs.getString("qp_cgh_proj")==null)?"":conexao.rs.getString("qp_cgh_proj"));
                            parametro.put("soma_teo", (conexao.rs.getString("qp_cgh_proj")!=null && conexao.rs.getString("qp_cgh_quali_teo")!=null)?""+(conexao.rs.getInt("qp_cgh_proj")+conexao.rs.getInt("qp_cgh_quali_teo")):"");
                            String SmTot = ""+(conexao.rs.getInt("qp_cgh_proj")+conexao.rs.getInt("qp_cgh_quali"));
                            parametro.put("soma_total", (SmTot.equals(""))?"":SmTot);
                            String TeoTot = ""+(conexao.rs.getInt("qp_cgh_proj")+conexao.rs.getInt("qp_cgh_quali_teo")+400);
                            parametro.put("soma_teo_f", (TeoTot.equals(""))?"":TeoTot);
                            String EsTot = ""+(conexao.rs.getInt("qp_cgh_quali_est")+200);
                            parametro.put("soma_est_f", (EsTot.equals(""))?"":EsTot);
                            SmTot = ""+(conexao.rs.getInt("qp_cgh_proj")+conexao.rs.getInt("qp_cgh_quali_teo")+conexao.rs.getInt("qp_cgh_quali_est")+600);
                            parametro.put("soma_total_f", (SmTot.equals(""))?"":SmTot);

                            JasperPrint jp = JasperFillManager.fillReport(LRarquivo.get(i).toString(), parametro);
                            dispose();
                            JasperViewer.viewReport(jp, false);
                        }
                    } catch (SQLException ex) {
                        verErros.setErro(ex.getMessage());
                    } catch (JRException ex) {
                        JOptionPane.showMessageDialog(null, "Erro ao abrir relatorio.\n"+ex.getMessage(),"Erro do Sistema",JOptionPane.ERROR_MESSAGE);
                    }
               }
           }
       }else{
           JOptionPane.showMessageDialog(null, "Favor selecionar um relatório.","Informação do Sistema",JOptionPane.ERROR_MESSAGE);
       }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        buscaVer.setTipo("");
        OpenBuscaVer();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        jtfDtIni.setText(new SimpleDateFormat("dd/MM/yyyy").format(new Date()));
        jtfDtFin.setText(new SimpleDateFormat("dd/MM/yyyy").format(new Date()));
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        jtfDtIni.setText("01/01/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/01/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        jtfDtIni.setText("01/02/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/02/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        jtfDtIni.setText("01/03/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/03/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        jtfDtIni.setText("01/05/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/05/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        jtfDtIni.setText("01/04/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/04/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton13ActionPerformed

    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
        jtfDtIni.setText("01/06/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/06/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton14ActionPerformed

    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
        jtfDtIni.setText("01/07/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/07/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton15ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
        jtfDtIni.setText("01/08/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/08/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton16ActionPerformed

    private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
        jtfDtIni.setText("01/09/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/09/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton17ActionPerformed

    private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
        jtfDtIni.setText("01/11/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/11/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton18ActionPerformed

    private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
        jtfDtIni.setText("01/10/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/10/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton19ActionPerformed

    private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
        jtfDtIni.setText("01/12/"+new SimpleDateFormat("yyyy").format(new Date()));
        jtfDtFin.setText("31/12/"+new SimpleDateFormat("yyyy").format(new Date()));
    }//GEN-LAST:event_jButton20ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        index.LRcurso.clear();
        buscaCurso bc = new buscaCurso(null,true);
        bc.setLocation((index.tela.width-bc.getWidth())/2, (index.tela.height-bc.getHeight())/2);
        bc.setVisible(true);
        if(buscaCurso.isConfirmaCurso()){
            jtfCurso.setText(index.LRcurso.get(1).toString());
        }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        index.LRturma.clear();
        index.LRfase.clear();
        buscaTurma bt = new buscaTurma(null,true);
        bt.setLocation((index.tela.width-bt.getWidth())/2, (index.tela.height-bt.getHeight())/2);
        bt.setVisible(true);
        if(buscaTurma.isConfirmaTurma()){
            jtfTurma.setText(index.LRturma.get(0).toString());
            jtfFase.setText(index.LRfase.get(0).toString());
        }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jTree1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTree1MouseClicked
       if(jTree1.getLastSelectedPathComponent() != null){
           for(int i=0;i<LRdescricao.size();i++){
               if(LRdescricao.get(i).equals(jTree1.getLastSelectedPathComponent().toString())){
                   StringTokenizer Tok = new StringTokenizer(LRurl.get(i).toString(), "'");
                   LimpaCorObj();
                   while (Tok.hasMoreElements()){
                       MudaCorObj(Tok.nextElement().toString());
                   }
                }
            }
        }
    }//GEN-LAST:event_jTree1MouseClicked

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        index.LRpessoa.clear();
        jtfPessoa.setText("");
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        index.LRturma.clear();
        index.LRturma.clear();
        jtfTurma.setText("");
        jtfFase.setText("");
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        jtfCurso.setText("");
        index.LRcurso.clear();
    }//GEN-LAST:event_jButton7ActionPerformed
    @SuppressWarnings("static-access")
    private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
        buscaDisciplina bd = new buscaDisciplina(null,true);
        bd.setLocation((index.tela.width-bd.getWidth())/2, (index.tela.height-bd.getHeight())/2);
        if(!jtfCurso.getText().isEmpty()){
            bd.bd_curso = jtfCurso.getText();
        }else if(!jtfTurma.getText().isEmpty()){
            bd.bd_curso = jtfTurma.getText();
        }
        bd.setVisible(true);
        if(!index.LRdisciplina.get(0).equals("")){
            jtfDisciplina.setText(index.LRdisciplina.get(1).toString());
        }
    }//GEN-LAST:event_jButton21ActionPerformed

    private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
        jtfDisciplina.setText("");
        index.LRdisciplina.clear();
    }//GEN-LAST:event_jButton22ActionPerformed

    private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
        
    }//GEN-LAST:event_jButton23ActionPerformed

    private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
        jtfRespFinanceiro.setText("");
    }//GEN-LAST:event_jButton24ActionPerformed
    @SuppressWarnings("static-access")
    private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
        buscaCpaAvaliacao bca = new buscaCpaAvaliacao(null,true);
        bca.setLocation((index.tela.width-bca.getWidth())/2, (index.tela.height-bca.getHeight())/2);
        bca.setVisible(true);
        if(bca.bcpaa_finaliza){
            jtfCod_avaliacao.setText(bca.bcpaa_dados.get(0).toString());
            jtfDesc_avaliacao.setText(bca.bcpaa_dados.get(1).toString());
            bca.bcpaa_dados.clear();
        }
    }//GEN-LAST:event_jButton25ActionPerformed

    private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
        jtfCod_avaliacao.setText("");
        jtfDesc_avaliacao.setText("");
    }//GEN-LAST:event_jButton26ActionPerformed

    private void formInternalFrameOpened(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameOpened
        DefaultMutableTreeNode raiz, no1, no2, no3, no4, no5, no6, no7;
        raiz = new DefaultMutableTreeNode("Relatorios");
        no1 = new DefaultMutableTreeNode("Diarios");
        no2 = new DefaultMutableTreeNode("Históricos");
        no3 = new DefaultMutableTreeNode("Listas");
        no4 = new DefaultMutableTreeNode("Boletins");
        no5 = new DefaultMutableTreeNode("Processo Seletivo");
        no6 = new DefaultMutableTreeNode("CPA");
        no7 = new DefaultMutableTreeNode("Diploma");

        raiz.add(no1);
        raiz.add(no2);
        raiz.add(no3);
        raiz.add(no4);
        raiz.add(no5);
        raiz.add(no6);
        raiz.add(no7);

        try {
            conexao.Query("select * from relatorios where tipo=\"Secretaria\" and cod_emp="+index.cod_emp+" and status=\"Ativo\" and filtro_tree is not null order by filtro_tree,descricao");
            while(conexao.rs.next()){
                LRdescricao.add(conexao.rs.getString("descricao"));
                LRurl.add(conexao.rs.getString("url"));

                if(conexao.rs.getInt("filtro_tree")<6){
                    LRtipo.add("Normal");
                    LRarquivo.add(index.relatorio+conexao.rs.getString("arquivo"));
                }else{
                    LRtipo.add("CPA");
                    LRarquivo.add(index.jasper+conexao.rs.getString("arquivo"));
                }

                switch(conexao.rs.getInt("filtro_tree")){
                    case 1:
                        no1.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 2:
                        no2.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 3:
                        no3.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 4:
                        no4.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 5:
                        no5.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 6:
                        no6.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                    case 7:
                        no7.add(new DefaultMutableTreeNode(conexao.rs.getString("descricao")));
                        break;
                }
            }
        } catch (SQLException ex) {
            verErros.setErro(ex.getStackTrace().toString());
        }
        //Inseri imagens ao jtree
        DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer)jTree1.getCellRenderer();
        renderer.setLeafIcon(leafIcon);
        renderer.setClosedIcon(closedIcon);
        renderer.setOpenIcon(openIcon);
        
        jTree1.setModel(new javax.swing.tree.DefaultTreeModel(raiz));
    }//GEN-LAST:event_formInternalFrameOpened
    private void LimpaCorObj(){
        jLabel12.setForeground(new Color(0,0,0));
        jLabel13.setForeground(new Color(0,0,0));
        jLabel6.setForeground(new Color(0,0,0));
        jLabel4.setForeground(new Color(0,0,0));
        jLabel5.setForeground(new Color(0,0,0));
        jLabel3.setForeground(new Color(0,0,0));
    }
    private void MudaCorObj(String Campo){
        if(Campo.equals("tr_dt_ini")){
            jLabel12.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_dt_fim")){
            jLabel13.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_pessoa")){
            jLabel6.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_fase")){
            jLabel4.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_turma")){
            jLabel3.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_disciplina")){
            jLabel5.setForeground(new Color(255,51,51));
        }
        if(Campo.equals("tr_avaliacao")){
            jLabel8.setForeground(new Color(255,51,51));
        }
    }

    protected void OpenBuscaVer(){
        index.LRpessoa.clear();
        buscaVer bv = new buscaVer(null,true);
        bv.setLocation((index.tela.width-bv.getWidth())/2, (index.tela.height-bv.getHeight())/2);
        bv.setVisible(true);
        if(buscaVer.isConfirmaBusca()){
            jtfPessoa.setText(index.LRpessoa.get(1).toString());
        }
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton20;
    private javax.swing.JButton jButton21;
    private javax.swing.JButton jButton22;
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton26;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTree jTree1;
    private javax.swing.JPanel jpCpa;
    private javax.swing.JTextField jtfAno;
    private javax.swing.JTextField jtfCod_avaliacao;
    private javax.swing.JTextField jtfCurso;
    private javax.swing.JTextField jtfDesc_avaliacao;
    private javax.swing.JTextField jtfDisciplina;
    private javax.swing.JFormattedTextField jtfDtFin;
    private javax.swing.JFormattedTextField jtfDtIni;
    private javax.swing.JTextField jtfFase;
    private javax.swing.JTextField jtfPessoa;
    private javax.swing.JTextField jtfRespFinanceiro;
    private javax.swing.JTextField jtfTurma;
    // End of variables declaration//GEN-END:variables

}
